package com.gitee.xhs.broadcastState;

import org.apache.flink.api.common.state.MapStateDescriptor;
import org.apache.flink.api.common.typeinfo.TypeInformation;

import static com.gitee.xhs.StateConstant.FLINK_CHECK_POINT_PATH;

/**
 * @author BigHead
 * @date 2022/7/4 14:44
 * @description BroadcastStateConstant
 */
public class BroadcastStateConstant {

    public static final String CUSTOM_BROADCAST_STATE_DIR = "broadcastState/";

    public static final String BROADCAST_STATE_PATH = FLINK_CHECK_POINT_PATH + CUSTOM_BROADCAST_STATE_DIR;
    public static final String BROADCAST_STATE_UID = "broadcast-state-uid";
    public static final String BROADCAST_STATE_NAME = "broadcast-state";
    public static final MapStateDescriptor<Long, BroadcastStateDao> BROADCAST_STATE_MAP_STATE_DESCRIPTOR = new MapStateDescriptor<>(
            BROADCAST_STATE_NAME,
            TypeInformation.of(Long.class),
            TypeInformation.of(BroadcastStateDao.class)
    );

}
